package com.example.kotlin.mvp

import android.view.View
import com.example.kotlin.R
import com.example.kotlin.mvp.base.BaseModel
import com.example.kotlin.mvp.base.BaseMvpActivity

class MvpActivity : BaseMvpActivity<UserInfoPresenter>(),UserInfoContract.UserInfoView{
    override fun onLoading() {
        println("开始加载")
    }

    override fun onError() {

    }

    override fun onSucceed(userInfo: UserInfo?) {

    }
var model:BaseModel?=null
    override fun initData() {

       // val canonicalName1 = model?.javaClass?.canonicalName
        println(UserInfoModel::class.java.canonicalName)
    }

    override fun initView() {

    }

    override fun createPresenter(): UserInfoPresenter? {
     return  UserInfoPresenter(this)
    }

    override fun setContentView() {
        setContentView(R.layout.activity_mvp)
    }

    fun runClick(view: View) {
      getPresenter()?.getUsers("1234567890")
    }

}
